Copyright: UserList Copyright DameWare Development 1998
Citation: DameWare Development 1998


 DameWare UserList Help Index

Properties	Methods

DameWare UserList Custom Control

Description:

DameWare UserList component is a 32-bit custom control for use with Visual Basic, Visual C++ , Windows Scripting Host and HTML/ASP Web pages or any environment that can host COM controls.  DameWare UserList provides functionality to manage all Windows NT user account information remotely, with many properties and methods.  One single component to manage your Windows NT user accounts including add, delete, password changes, full name, comment, logon server, home directory, logon script path, home drive, account disable, user account password not required, user account cannot change password, account lock out, password doesn’t expire, and user must change password on next logon.

Note: DameWare UserList is designed to run on Windows NT only from an application, however UserList will run from any client running a browser that supports COM.

The DameWare UserList ActiveX control utilizes the ActiveX Template Library (ATL), which reduces dependencies on other library files.  Additional information on the ATL is available on our web site at: http://www.dameware.com/faq.htm

Registration:

How to register

What do I get when I register

License

Copyright

Installation and Support:

Installation

Technical Support

Using within a Web page


Technical Support

Technical Support is provided in any of the following ways for your convenience:

•  If possible, we prefer that you use e-mail to communicate with us. Because we check e-mail many times daily (most often via our support@dameware.com account), you can be sure we will be able to respond to you quickly.

•  Online FAQ is available at http://www.dameware.com/faq.htm.

•  Online discussion group can be viewed at http://www.dameware.com/discuss.htm.

•  You can fax us at 504-626-1189.

•  You can contact us by phone at 504-626-7545 (recommended to be used as a last resort)

DAMEWARE DEVELOPMENT

1024 Live Oak Loop

Mandeville, La.  70448


How to register
How To Order

For added convenience, you may order UserList in any of the following ways:

♦	Visit our Web Site at http://www.dameware.com/northstar.htm to order online with your Visa, MasterCard or Discover credit card, fax your order, or order by telephone:

Online at http://www.dameware.com/northstar.htm
Faxed Orders at 1-785-539-3743
Phoned Orders  calls taken 10am - 8pm, EST, Monday-Friday
     1-800-699-6395 (From the USA only)
     1-785-539-3731

Be sure to reference product number #3030 when ordering from NorthStar.

Note: Any product or support questions should be sent to support@dameware.com.  NorthStar solutions is a purchase vendor only, for DameWare Development, and unable to answer any questions about our products!

♦	For quantity pricing, please contact DameWare Development at sales@dameware.com.

♦	If you prefer to pay by check, or money order please send order information to:

DAMEWARE DEVELOPMENT

1024 Live Oak Loop

Mandeville, LA.  70448

♦	For payment by purchase order please send order information to address below, or fax to 504-626-1189:

DAMEWARE DEVELOPMENT

1024 Live Oak Loop

Mandeville, LA.  70448

Note: NorthStar Solutions does NOT accept purchase orders.


What do I get when I register
What do I get when I order

There are no limitations in this shareware release, but you may encounter a "nag" screen from time to time.  Upon receipt of your order you will receive a license file which will remove the "nag" screen. The product will be registered in your name and you will receive the latest version.  It's a small price to pay for your peace of mind. You may also wish to check on our Web Home Page for the latest version which you have rights to use as a registered user.  Our Web Home Page address is:  http://www.dameware.com.


License Agreement

UserList is not public domain or free software.

UserList is copyrighted, and all rights are reserved by DameWare Development.

Licensing:

1. shareware version

You may use the shareware version of UserList for up to 30 days in your design environment for evaluation purposes only. You may copy and distribute it freely as long as all the files in the package, including the demo programs are distributed with it and no changes or additions of any kind are made to the original package.

2. registered version

As a registered user, you can use UserList in your design environment and you have a royalty-free right to distribute executables that use UserList as a runtime component. Only registered users can distribute executables using UserList.

You may copy the software to facilitate your use of it on as many computers as there are licensed users specified in the license file. Making copies for any other purpose violates international copyright laws. In particular, you are prohibited from distributing a registered version of UserList, except as a runtime component of one of your applications.

The license file allows you to compile your applications with UserList. You are not allowed to distribute the UserList.LIC or UserList.LPK license files with any application that you distribute.  You are allowed to distribute the UserListR.LIC with your Windows Scripting Host script(s).

Disclaimer of Warranty:

THIS SOFTWARE AND THE ACCOMPANYING FILES ARE SOLD "AS IS"  WITHOUT WARRANTY OF ANY KIND EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

Good data processing procedure dictates that any program be thoroughly tested with non-critical data before relying on it.

The user must assume the entire risk of using the program.

Your use of this product indicates that you have read and agreed to these terms.


Installation

DameWare UserList is distributed with a self-extracting installation wizard file - UserListW.exe.  Once executed, UserListW.exe will install the UserList components into a directory of your choosing (c:\Program Files\DameWare\UserList\ by default), and register the UserList.dll component into the Windows system registry.

The following is a list of the files installed during the installation wizard process:

UserList.DLL	32-bit ActiveX DLL Control

UserList.HLP	On-line documentation

UserList.CNT	Context file for On-line documentation

UserList.EXE	UserList VB sample executable

UserList.FRM	UserList VB sample form

UserList.VBP	UserList VB sample project file

UserList.HTM	UserList Web page sample file

UserList.VBS	UserList Windows Scripting Host sample script

Once you have registered the UserList component, you will receive the following license files:

UserList.LIC	License file

UserList.LPK	License file for web pages

UserListR.LIC	License file for Windows Scripting Host

Distribution Note:

When you create and distribute applications that use UserList, you can install the appropriate file in the customer's Microsoft Windows \SYSTEM subdirectory, or any specific directory as long as the component is registered to that subdirectory.

Note: You are not allowed to distribute the UserList.LIC or UserList.LPK license files with any application that you distribute.  You are allowed to distribute the UserListR.LIC file with your Windows Scripting Host script(s).


Using within a Web page.
Using in a Web page

UserList Active control can easily be used in a Web Page.  The following is a simple example.  You may also wish to visit sites such as Microsoft at (http://www.microsoft.com/workshop) or DameWare Development’s home page at (http://www.dameware.com).

<html>

<head>

<title>UserList</title>

</head>

<body>

<p align="center">

<object classid="clsid:5220cb21-c88d-11cf-b347-00aa00a28331" width="0" height="0">

  <param name="LPKPath" value="UserList.lpk"><embed src="UserList.lpk">

</object>

<object ID="UserListCtl1" < CLASSID="CLSID:7813D738-D980-11D1-A28F-00C04FA30E7F"

codebase="UserList.dll.dll#Version=1,4,1,1" WIDTH="0"

HEIGHT="0">

</object>

<br>

<font color="#808000"><big><em><strong><big>UserList</big></strong></em></big></font></p>

<div align="center"><center>

<table border="0" width="75%" cellspacing="0" cellpadding="0">

  <tr>

    <td width="25%">Machine Name</td>

    <td width="21%" valign="bottom" align="left"><input value name="Machine" size="16"></td>

    <td width="22%" valign="bottom" align="left"></td>

    <td width="24%" valign="bottom" align="left"></td>

  </tr>

  <tr>

    <td width="25%">Connect UserID</td>

    <td width="21%" valign="bottom" align="left"><input value name="ConnectUserID" size="16"></td>

    <td width="22%" valign="bottom" align="left"><input type="button" value="Connect"

    name="BtnConnect"></td>

  </tr>

  <tr>

    <td width="25%">Connect Password</td>

    <td width="21%" valign="bottom" align="left"><input type="password" value

    name="ConnectPassword" size="16"></td>

    <td width="22%" valign="bottom" align="left"><input type="button" value="Disconnect"

    name="BtnDisconnect"></td>

    <td width="24%" valign="bottom" align="left"></td>

  </tr>

</table>

</center></div><div align="center"><center>

<table border="0" width="92%">

  <tr>

    <td width="22%">Domain</td>

    <td width="20%"><input value name="Domain" size="16"></td>

    <td width="24%"><input type="button" value="Get Domain Controller" name="BtnDC"></td>

    <td width="39%"></td>

  </tr>

  <tr>

    <td width="22%">Get User Beginning With</td>

    <td width="20%"><input value name="GetUserBeginningWith" size="16"></td>

    <td width="24%"><input type="button" value="Get All Users" name="BtnGetAllUsers"></td>

    <td width="39%"></td>

  </tr>

  <tr>

    <td width="22%">UserID</td>

    <td width="20%"><input value name="UserID" size="16"></td>

    <td width="24%"><input type="button" value="Get Users" name="BtnGetUsers"></td>

    <td width="39%"><input type="checkbox" value="0" name="chkUserAccountDisable">User Account

    Disable</td>

  </tr>

  <tr>

    <td width="22%">User Full Name</td>

    <td width="20%"><input value name="UserFullName" size="16"></td>

    <td width="24%"><input type="button" value="Add User" name="BtnAddUser"></td>

    <td width="39%"><input type="checkbox" value="0" name="chkPasswordNotReq">User Account

    Password not required</td>

  </tr>

  <tr>

    <td width="22%">User Comment</td>

    <td width="20%"><input value name="UserComment" size="16"></td>

    <td width="24%"><input type="button" value="Delete User" name="BtnDeleteUser"></td>

    <td width="39%"><input type="checkbox" value="0" name="chkCannotChange">User Account

    cannot change password</td>

  </tr>

  <tr>

    <td width="22%">User Logon Server</td>

    <td width="20%"><input value name="UserLogonServer" size="16"></td>

    <td width="24%"></td>

    <td width="39%"><input type="checkbox" value="0" name="chkLockedOut">User Account locked

    out</td>

  </tr>

  <tr>

    <td width="22%">User Home Drive</td>

    <td width="20%"><input value name="UserHomeDrive" size="16"></td>

    <td width="24%"><input type="button" value="Get User Info" name="BtnGetUserInfo"></td>

    <td width="39%"><input type="checkbox" value="0" name="chkPasswordDontExpire">User Account

    Password don't expire</td>

  </tr>

  <tr>

    <td width="22%">User Home Dir</td>

    <td width="20%"><input value name="UserHomeDir" size="16"></td>

    <td width="24%"><input type="button" value="Set User Info" name="BtnSetUserInfo"></td>

    <td width="39%"><input type="checkbox" value="0" name="chkMustchange">User must change

    password at next logon</td>

  </tr>

  <tr>

    <td width="22%">User Password</td>

    <td width="20%"><input value name="UserPassword" size="16" type="password"></td>

    <td width="24%"></td>

    <td width="39%"></td>

  </tr>

  <tr>

    <td width="22%">User Logon Script Path</td>

    <td width="20%"><input value name="UserLogonScriptPath" size="16"></td>

    <td width="24%"></td>

    <td width="39%"></td>

  </tr>

  <tr>

    <td width="22%">User Logon Script</td>

    <td width="20%"><input value name="UserLogonScript" size="16"></td>

    <td width="24%"></td>

    <td width="39%"></td>

  </tr>

  <tr>

    <td width="22%">New User Password</td>

    <td width="20%"><input value name="NewUserPassword" size="16" type="password"></td>

    <td width="24%"><input type="button" value="Change Password" name="BtnChangePassword"></td>

    <td width="39%"></td>

  </tr>

</table>

</center></div>

<p align="center"><textarea name="List1" rows="4" cols="82"></textarea></p>

<p><script language="VBSCRIPT">

Sub Window_OnLoad

Machine.value = UserListCtl1.GetLocalMachineName

UserID.value = UserListCtl1.GetCurrentUserID

ConnectUserID.value = UserListCtl1.GetCurrentUserID

End Sub

Sub BtnConnect_OnClick()

UserListCtl1.Machine = Machine.value

UserListCtl1.ConnectPassword = ConnectPassword.value

UserListCtl1.ConnectUserID = ConnectUserID.value

UserListCtl1.ConnectUser

End Sub

Sub BtnDisConnect_OnClick()

UserListCtl1.Machine = Machine.value

UserListCtl1.DisconnectUser

End Sub

Sub BtnDC_OnClick()

UserListCtl1.Domain = Domain.value

Machine.value = UserListCtl1.GetDCName

End Sub

Sub BtnGetAllUsers_OnClick()

UserID.value = ""

UserFullName.value = ""

UserComment.value = ""

UserHomeDir.value = ""

UserLogonScriptPath.value = ""

UserLogonScript.value = ""

UserHomeDrive.value = ""

NewUserPassword.value = ""

chkUserAccountDisable.Value = 0

chkUserAccountDisable.checked = FALSE

chkPasswordNotReq.Value = 0

chkPasswordNotReq.checked = FALSE

chkCannotChange.Value = 0

chkCannotChange.checked = FALSE

chkLockedOut.Value = 0

chkLockedOut.checked = FALSE

chkPasswordDontExpire.Value = 0

chkPasswordDontExpire.checked = FALSE

chkMustchange.Value = 0

chkMustchange.checked = FALSE

List1.value = ""

UserListCtl1.Machine = Machine.value

UserListCtl1.SetFirstUser

While UserListCtl1.UserGetNext <> 0

if List1.value = "" then

   List1.value = UserListCtl1.UserName + Chr(9) + UserListCtl1.UserFullName + Chr(9) + UserListCtl1.UserComment

else

   List1.value = List1.value + chr(10) + UserListCtl1.UserName + Chr(9) + UserListCtl1.UserFullName + Chr(9) + UserListCtl1.UserComment

end if

   Wend

End Sub

Sub BtnGetUsers_OnClick()

Dim StringToFind

List1.value = ""

UserListCtl1.Machine = Machine.value

StringToFind = GetUserBeginningWith.value

If UserListCtl1.SetFirstUserBeginningWith(StringToFind) <> 0 Then

    	While UserListCtl1.UserGetNext <> 0

    	  	 If InStr(1, UserListCtl1.UserName, StringToFind,1) <= 0 Then

           Exit Sub

else

    	  	 If InStr(1, UserListCtl1.UserName, StringToFind,1) <= Len(StringToFind) Then

if List1.value = "" then

    	   	 List1.value = UserListCtl1.UserName + Chr(9) + UserListCtl1.UserFullName + Chr(9) + UserListCtl1.UserComment

else

    	   	 List1.value = List1.value + chr(10) + UserListCtl1.UserName + Chr(9) + UserListCtl1.UserFullName + Chr(9) + UserListCtl1.UserComment

end if

    	 End If

End If

    	Wend

End If

End Sub

Sub BtnAddUser_OnClick()

UserListCtl1.Machine = Machine.value

UserListCtl1.UserName = UserID.value

UserListCtl1.UserFullName = UserFullName.value

UserListCtl1.UserComment = UserComment.value

UserListCtl1.UserHomeDir = UserHomeDir.value

UserListCtl1.UserPassword = UserPassword.value

UserListCtl1.UserScriptPath = UserLogonScriptPath.value

UserListCtl1.UserScriptName = UserLogonScript.value

UserListCtl1.UserHomeDrive = UserHomeDrive.value

if 	chkUserAccountDisable.checked then

chkUserAccountDisable.Value = 1

else

chkUserAccountDisable.Value = 0

end if

UserListCtl1.UserAccountDisable = chkUserAccountDisable.Value

if 	chkPasswordNotReq.checked then

chkPasswordNotReq.Value = 1

else

chkPasswordNotReq.Value = 0

end if

UserListCtl1.UserAccountPasswordNotRequired = chkPasswordNotReq.Value

if 	chkCannotChange.checked then

chkCannotChange.Value = 1

else

chkCannotChange.Value = 0

end if

UserListCtl1.UserAccountPasswordCanNotChange = chkCannotChange.Value

if 	chkLockedOut.checked then

chkLockedOut.Value = 1

else

chkLockedOut.Value = 0

end if

UserListCtl1.UserAccountLockedOut = chkLockedOut.Value

if 	chkPasswordDontExpire.checked then

chkPasswordDontExpire.Value = 1

else

chkPasswordDontExpire.Value = 0

end if

UserListCtl1.UserAccountPasswordDontExpire = chkPasswordDontExpire.Value

if 	chkMustchange.checked then

chkMustchange.Value = 1

else

chkMustchange.Value = 0

end if

UserListCtl1.UserAccountPasswordExpired = chkMustchange.Value

UserListCtl1.UserAdd

End Sub

Sub BtnDeleteUser_OnClick()

Dim Response

Response = MsgBox("Are you sure you want to delete User: " + UserID.value + " From: " + Machine.value, vbQuestion + vbYesNo, "Information")

If Response = vbNo Then

    Exit Sub

End If

UserListCtl1.Machine = Machine.value

UserListCtl1.UserName = UserID.value

UserListCtl1.UserDelete

End Sub

Sub BtnGetUserInfo_OnClick()

UserListCtl1.Machine = Machine.value

UserListCtl1.UserName = UserID.value

UserListCtl1.UserGetInfo

Machine.value = UserListCtl1.Machine

UserID.value = UserListCtl1.UserName

UserFullName.value = UserListCtl1.UserFullName

UserComment.value = UserListCtl1.UserComment

UserHomeDir.value = UserListCtl1.UserHomeDir

UserLogonScriptPath.value = UserListCtl1.UserScriptPath

UserLogonScript.value = UserListCtl1.UserScriptName

UserHomeDrive.value = UserListCtl1.UserHomeDrive

chkUserAccountDisable.Value = UserListCtl1.UserAccountDisable

if 	chkUserAccountDisable.Value = 1 then

chkUserAccountDisable.checked = TRUE

else

chkUserAccountDisable.checked = FALSE

end if

chkPasswordNotReq.Value = UserListCtl1.UserAccountPasswordNotRequired

if 	chkPasswordNotReq.Value = 1 then

chkPasswordNotReq.checked = TRUE

else

chkPasswordNotReq.checked = FALSE

end if

chkCannotChange.Value = UserListCtl1.UserAccountPasswordCanNotChange

if 	chkCannotChange.Value = 1 then

chkCannotChange.checked = TRUE

else

chkCannotChange.checked = FALSE

end if

chkLockedOut.Value = UserListCtl1.UserAccountLockedOut

if 	chkLockedOut.Value = 1 then

chkLockedOut.checked = TRUE

else

chkLockedOut.checked = FALSE

end if

chkPasswordDontExpire.Value = UserListCtl1.UserAccountPasswordDontExpire

if 	chkPasswordDontExpire.Value = 1 then

chkPasswordDontExpire.checked = TRUE

else

chkPasswordDontExpire.checked = FALSE

end if

chkMustchange.Value = UserListCtl1.UserAccountPasswordExpired

if 	chkMustchange.Value = 1 then

chkMustchange.checked = TRUE

else

chkMustchange.checked = FALSE

end if

End Sub

Sub BtnSetUserInfo_OnClick()

UserListCtl1.Machine = Machine.value

UserListCtl1.UserName = UserID.value

UserListCtl1.UserFullName = UserFullName.value

UserListCtl1.UserComment = UserComment.value

UserListCtl1.UserHomeDir = UserHomeDir.value

UserListCtl1.UserScriptPath = UserLogonScriptPath.value

UserListCtl1.UserScriptName = UserLogonScript.value

UserListCtl1.UserHomeDrive = UserHomeDrive.value

if 	chkUserAccountDisable.checked then

chkUserAccountDisable.Value = 1

else

chkUserAccountDisable.Value = 0

end if

UserListCtl1.UserAccountDisable = chkUserAccountDisable.Value

if 	chkPasswordNotReq.checked then

chkPasswordNotReq.Value = 1

else

chkPasswordNotReq.Value = 0

end if

UserListCtl1.UserAccountPasswordNotRequired = chkPasswordNotReq.Value

if 	chkCannotChange.checked then

chkCannotChange.Value = 1

else

chkCannotChange.Value = 0

end if

UserListCtl1.UserAccountPasswordCanNotChange = chkCannotChange.Value

if 	chkLockedOut.checked then

chkLockedOut.Value = 1

else

chkLockedOut.Value = 0

end if

UserListCtl1.UserAccountLockedOut = chkLockedOut.Value

if 	chkPasswordDontExpire.checked then

chkPasswordDontExpire.Value = 1

else

chkPasswordDontExpire.Value = 0

end if

UserListCtl1.UserAccountPasswordDontExpire = chkPasswordDontExpire.Value

if 	chkMustchange.checked then

chkMustchange.Value = 1

else

chkMustchange.Value = 0

end if

UserListCtl1.UserAccountPasswordExpired = chkMustchange.Value

UserListCtl1.UserSetInfo

End Sub

Sub BtnChangePassword_OnClick()

UserListCtl1.Machine = Machine.value

UserListCtl1.UserName = UserID.value

UserListCtl1.UserNewPassword = NewUserPassword.value

UserListCtl1.UserChangePassword

End Sub

</script>

</body>

</html>


Displays appropriate Copyright notices
Copyright

Copyright© 1998 DameWare Development

Portions of this product are Copyrighted (c) 1991-1998 by Microsoft Corporation.

All rights are reserved. All  Microsoft Corporation disclaimers apply.

UserList is a trademark of DameWare Development.

Microsoft Windows is a registered trademark of Microsoft Corporation.

Microsoft Windows Scripting Host is a registered trademark of Microsoft Corporation.


Displays Properties
Properties

All the properties are listed below. Properties that apply only to

UserList, or require special consideration when used with it,

are underlined. They are documented in this help file. See the

Visual Basic Language Reference or online Help for

documentation of the remaining properties.

(About)	(Name)
ConnectPassword	ConnectUserID
Domain	DragIcon
DragMode	DragMode
Height	HelpContextID
Index	Left
LastError	Machine
TabIndex	TabStop
Tag	ToolTipText
Top	UserAccountDisable
UserAccountLockedOut	UserAccountPasswordCanNotChange
UserAccountPasswordDontExpire	UserAccountPasswordExpired
UserAccountPasswordNotRequired	UserComment
UserFullName	UserHomeDir
UserHomeDrive	UserLogonServer
UserName	UserNewPassword
UserPassword	UserScriptName
UserScriptPath	Valid
Visible	WhatsThisHelpID
Width


Display the About box
(About) Property

Properties	Methods

Description

The (About) property will invoke the DameWare UserList About box dialog.  This dialog is used to display the control’s registration information.

Syntax

UserListCtl1.AboutBox

Notes

The About box dialog will be displayed in the Windows environment until the control is registered with the license file (UserList.lic), or the Web environment with the license file (UserList.lpk).


Specify the password for the user account on the target machine to connect with.
ConnectPassword Property

Properties	Methods

Description

Specifies the password for the user account to connect with on the target machine specified.

Syntax

UserListCtl1.ConnectPassword = “mypassword”

Data Type

String

Notes

Windows NT pass through authentication is in effect - that is, if the currently logged in user has the equivalent authentication privileges on the target machine, no password is necessary.

Example

Private Sub Form_Load()

UserListCtl1.Machine = Text1.Text

UserListCtl1.ConnectPassword = Text8.Text

UserListCtl1.ConnectUserID = Text3.Text

UserListCtl1.ConnectUser

End Sub

See Also

ConnectUserID

Machine


Specify the UserID for the user account on the target machine to connect with.
ConnectUserID Property

Properties	Methods

Description

Specifies the UserID for the user account to connect with on the target machine specified.

Syntax

UserListCtl1.ConnectUserID = “myUserID”

Data Type

String

Notes

Windows NT pass through authentication is in effect - that is, if the currently logged in user has the equivalent authentication privileges on the target machine, no password is necessary.

Example

Private Sub Form_Load()

UserListCtl1.Machine = Text1.Text

UserListCtl1.ConnectPassword = Text8.Text

UserListCtl1.ConnectUserID = Text3.Text

UserListCtl1.ConnectUser

End Sub

See Also

ConnectPassword

Machine


Specify the domain name to find the domain controller machine name for.
Domain Property

Properties	Methods

Description

Specifies the Windows NT Domain name to be used to find the Windows NT Domain Controller machine name for.

Syntax

UserListCtl1.Domain = “federation.com”

Data Type

String

Example

Private Sub Command10_Click()

UserListCtl1.Domain = Text12.Text

Text1.Text = UserListCtl1.GetDCName

End Sub

See Also

GetDCName


Returns the last system level error code trapped by UserList.
LastError Property

Properties	Methods

Description

Retrieves or returns the last operating system or system level error code trapped by UserList.

Syntax

MyLong = UserListCtl1.LastError

Data Type

Long

Example

Sub OnErrorHandler()

MsgBox "Last error was " & UserListCtl1.LastError

If Err.Number <> 0 Then

    MsgBox Err.Description, vbCritical, "Error"

End If

End Sub


Specify the machine name to connect to.
Machine Property

Properties	Methods

Description

Specifies the machine name to connect to.

Syntax

UserListCtl1.Machine = “\\machinename”

Data Type

String

Notes

The machine name should be specified with two preceding back-slashes - e.g. \\enterprise.

Example

Private Sub Command1_Click()

UserListCtl1.Machine = Text1.Text

UserListCtl1.ConnectPassword = Text8.Text

UserListCtl1.ConnectUserID = Text3.Text

UserListCtl1.ConnectUser

Exit Sub

See Also

ConnectPassword

ConnectUserID


Specify whether to disable the user account specified.
UserAccountDisable Property

Properties	Methods

Description

Specifies whether to disable the user account specified.

Syntax

UserListCtl1.UserAccountDisable = True | False

Data Type

Boolean

Notes

False or unselected can be specified with a zero(0) - True or selected can be specified with a one (1).

Example

Private Sub Command7_Click()

UserListCtl1.Machine = Text1.Text

UserListCtl1.UserName = Text3.Text

UserListCtl1.UserAccountDisable = Check1.Value

UserListCtl1.UserAccountPasswordNotRequired = Check2.Value

UserListCtl1.UserAccountPasswordCanNotChange = Check3.Value

UserListCtl1.UserAccountLockedOut = Check4.Value

UserListCtl1.UserAccountPasswordDontExpire = Check5.Value

UserListCtl1.UserSetInfo

End Sub

See Also

UserAccountLockedOut

UserAccountPasswordCanNotChange

UserAccountPasswordDontExpire

UserAccountPasswordExpired

UserAccountPasswordNotRequired


Specify whether to lock out the user account specified.
UserAccountLockedOut Property

Properties	Methods

Description

When selected, prevents an account from logging on.  If the account is currently locked out, this check box is selected (in Windows NT User Manager) and available to be unchecked from DameWare UserList.

Syntax

UserListCtl1.UserAccountLockedOut = True | False

Data Type

Boolean

Notes

False or unselected can be specified with a zero(0) - True or selected can be specified with a one (1).

Example

Private Sub Command7_Click()

UserListCtl1.Machine = Text1.Text

UserListCtl1.UserName = Text3.Text

UserListCtl1.UserAccountDisable = Check1.Value

UserListCtl1.UserAccountPasswordNotRequired = Check2.Value

UserListCtl1.UserAccountPasswordCanNotChange = Check3.Value

UserListCtl1.UserAccountLockedOut = Check4.Value

UserListCtl1.UserAccountPasswordDontExpire = Check5.Value

UserListCtl1.UserSetInfo

End Sub

See Also

UserAccountDisable

UserAccountPasswordCanNotChange

UserAccountPasswordDontExpire

UserAccountPasswordExpired

UserAccountPasswordNotRequired


Specify whether to prevent the user from changing the assigned password.
UserAccountPasswordCanNotChange Property

Properties	Methods

Description

When selected, prevents the user from changing the assigned password.

Syntax

UserListCtl1.UserAccountPasswordCanNotChange = True | False

Data Type

Boolean

Notes

False or unselected can be specified with a zero(0) - True or selected can be specified with a one (1).

Example

Private Sub Command7_Click()

UserListCtl1.Machine = Text1.Text

UserListCtl1.UserName = Text3.Text

UserListCtl1.UserAccountDisable = Check1.Value

UserListCtl1.UserAccountPasswordNotRequired = Check2.Value

UserListCtl1.UserAccountPasswordCanNotChange = Check3.Value

UserListCtl1.UserAccountLockedOut = Check4.Value

UserListCtl1.UserAccountPasswordDontExpire = Check5.Value

UserListCtl1.UserSetInfo

End Sub

See Also

UserAccountDisable

UserAccountLockedOut

UserAccountPasswordDontExpire

UserAccountPasswordExpired

UserAccountPasswordNotRequired


Specify whether to prevent the user account password from expiring.
UserAccountPasswordDontExpire Property

Properties	Methods

Description

When selected, prevents the user account password from expiring.

Syntax

UserListCtl1.UserAccountPasswordDontExpire = True | False

Data Type

Boolean

Notes

1. False or unselected can be specified with a zero(0) - True or selected can be specified with a one (1).

2. This setting overrides the ‘User Must Change Password At Next Logon’.

Example

Private Sub Command7_Click()

UserListCtl1.Machine = Text1.Text

UserListCtl1.UserName = Text3.Text

UserListCtl1.UserAccountDisable = Check1.Value

UserListCtl1.UserAccountPasswordNotRequired = Check2.Value

UserListCtl1.UserAccountPasswordCanNotChange = Check3.Value

UserListCtl1.UserAccountLockedOut = Check4.Value

UserListCtl1.UserAccountPasswordDontExpire = Check5.Value

UserListCtl1.UserSetInfo

End Sub

See Also

UserAccountDisable

UserAccountLockedOut

UserAccountPasswordCanNotChange

UserAccountPasswordExpired

UserAccountPasswordNotRequired


Specify whether to force the user to change the password at the next logon.
UserAccountPasswordExpired Property

Properties	Methods

Description

When selected, forces the user to change the password at the next logon.

Syntax

UserListCtl1.UserAccountPasswordExpired = True | False

Data Type

Boolean

Notes

1. False or unselected can be specified with a zero(0) - True or selected can be specified with a one (1).

2. This setting is equivalent to the ‘User Must Change Password At Next Logon’.

Example

Private Sub Command7_Click()

UserListCtl1.Machine = Text1.Text

UserListCtl1.UserName = Text3.Text

UserListCtl1.UserAccountDisable = Check1.Value

UserListCtl1.UserAccountPasswordNotRequired = Check2.Value

UserListCtl1.UserAccountPasswordCanNotChange = Check3.Value

UserListCtl1.UserAccountLockedOut = Check4.Value

UserListCtl1.UserAccountPasswordDontExpire = Check5.Value

UserListCtl1.UserAccountPasswordExpired = Check6.Value

UserListCtl1.UserSetInfo

End Sub

See Also

UserAccountDisable

UserAccountLockedOut

UserAccountPasswordCanNotChange

UserAccountPasswordDontExpire

UserAccountPasswordNotRequired


Specify whether to allow the user to have a blank password.
UserAccountPasswordNotRequired Property

Properties	Methods

Description

When selected, will allow the user to have a empty password.

Syntax

UserListCtl1.UserAccountPasswordNotRequired = True | False

Data Type

Boolean

Notes

1. False or unselected can be specified with a zero(0) - True or selected can be specified with a one (1).

2. This setting is equivalent to the ‘Minimum Password Length/Permit Blank Password’  setting(s) under the Account Policy of Windows NT User Manager.

Example

Private Sub Command7_Click()

UserListCtl1.Machine = Text1.Text

UserListCtl1.UserName = Text3.Text

UserListCtl1.UserAccountDisable = Check1.Value

UserListCtl1.UserAccountPasswordNotRequired = Check2.Value

UserListCtl1.UserAccountPasswordCanNotChange = Check3.Value

UserListCtl1.UserAccountLockedOut = Check4.Value

UserListCtl1.UserAccountPasswordDontExpire = Check5.Value

UserListCtl1.UserAccountPasswordExpired = Check6.Value

UserListCtl1.UserSetInfo

End Sub

See Also

UserAccountDisable

UserAccountLockedOut

UserAccountPasswordCanNotChange

UserAccountPasswordDontExpire

UserAccountPasswordExpired


Specifies the information to be stored in the user account description field.
UserComment Property

Properties	Methods

Description

Specifies the information to be stored in the user account description field.

Syntax

UserListCtl1.UserComment = “User Description”

Data Type

String

Example

Private Sub Command7_Click()

UserListCtl1.Machine = Text1.Text

UserListCtl1.UserName = Text3.Text

UserListCtl1.UserFullName = Text4.Text

UserListCtl1.UserComment = Text5.Text

UserListCtl1.UserHomeDir = Text7.Text

UserListCtl1.UserScriptPath = Text9.Text

UserListCtl1.UserScriptName = Text15.Text

UserListCtl1.UserHomeDrive = Text11.Text

UserListCtl1.UserSetInfo

End Sub

See Also

UserFullName

UserHomeDir

UserHomeDrive

UserLogonServer

UserName

UserNewPassword

UserPassword

UserScriptName

UserScriptPath


Specifies the information to be stored in the user account full name field.
UserFullName Property

Properties	Methods

Description

Specifies the information to be stored in the user account full name field.

Syntax

UserListCtl1.UserFullName = “User full name”

Data Type

String

Example

Private Sub Command7_Click()

UserListCtl1.Machine = Text1.Text

UserListCtl1.UserName = Text3.Text

UserListCtl1.UserFullName = Text4.Text

UserListCtl1.UserComment = Text5.Text

UserListCtl1.UserHomeDir = Text7.Text

UserListCtl1.UserScriptPath = Text9.Text

UserListCtl1.UserScriptName = Text15.Text

UserListCtl1.UserHomeDrive = Text11.Text

UserListCtl1.UserSetInfo

End Sub

See Also

UserComment

UserHomeDir

UserHomeDrive

UserLogonServer

UserName

UserNewPassword

UserPassword

UserScriptName

UserScriptPath


Specifies the information to be stored in the user account local path field.
UserHomeDir Property

Properties	Methods

Description

Specifies the information to be stored in the user account Home Directory/Local Path contained within the User Environment Profile.

Syntax

UserListCtl1.UserHomeDir = “User home directory”

Data Type

String

Example

Private Sub Command7_Click()

UserListCtl1.Machine = Text1.Text

UserListCtl1.UserName = Text3.Text

UserListCtl1.UserFullName = Text4.Text

UserListCtl1.UserComment = Text5.Text

UserListCtl1.UserHomeDir = Text7.Text

UserListCtl1.UserScriptPath = Text9.Text

UserListCtl1.UserScriptName = Text15.Text

UserListCtl1.UserHomeDrive = Text11.Text

UserListCtl1.UserSetInfo

End Sub

See Also

UserComment

UserFullName

UserHomeDrive

UserLogonServer

UserName

UserNewPassword

UserPassword

UserScriptName

UserScriptPath


Specifies the information to be stored in the user account connect drive letter field.
UserHomeDrive Property

Properties	Methods

Description

When specified, assigns the information entered to the user account Home Directory/Connect drive letter, and assigns the UserHomeDir information to the Home Directory/Connect To field contained within the User Environment Profile.

Syntax

UserListCtl1.UserHomeDrive = “User connect drive letter”

Data Type

String

Example

Private Sub Command7_Click()

UserListCtl1.Machine = Text1.Text

UserListCtl1.UserName = Text3.Text

UserListCtl1.UserFullName = Text4.Text

UserListCtl1.UserComment = Text5.Text

UserListCtl1.UserHomeDir = Text7.Text

UserListCtl1.UserScriptPath = Text9.Text

UserListCtl1.UserScriptName = Text15.Text

UserListCtl1.UserHomeDrive = “X:”

UserListCtl1.UserSetInfo

End Sub

See Also

UserComment

UserFullName

UserHomeDir

UserLogonServer

UserName

UserNewPassword

UserPassword

UserScriptName

UserScriptPath


Retrieves a string that contains the name of the server to which logon requests are sent.
UserLogonServer Property

Properties	Methods

Description

The UserLogonServer property will retrieve a Unicode string that contains the name of the server to which logon requests are sent.

Syntax

Text6.Text = UserListCtl1.UserLogonServer

Data Type

String

Notes

1. Server names should be preceded by two backslashes (\\).  A server name of an asterisk (\\*) indicates that the logon request can be handled by any logon server.  A null string indicates that requests are sent to the domain controller.

2. For Windows NT Servers, UserGetInfo return \\*.   The UserAdd and UserSetInfo functions ignore this member.

Example

Private Sub Command7_Click()

UserListCtl1.Machine = Text1.Text

UserListCtl1.UserName = Text3.Text

UserListCtl1.UserGetInfo

Text6.Text = UserListCtl1.UserLogonServer

End Sub

See Also

UserComment

UserFullName

UserHomeDir

UserHomeDrive

UserName

UserNewPassword

UserPassword

UserScriptName

UserScriptPath


Specifies the information to be stored in the user account Username field.
UserName Property

Properties	Methods

Description

Specifies the information to be stored in the user account Username field.

Syntax

UserListCtl1.UserName = “User name”

Data Type

String

Example

Private Sub Command7_Click()

UserListCtl1.Machine = Text1.Text

UserListCtl1.UserName = Text3.Text

UserListCtl1.UserFullName = Text4.Text

UserListCtl1.UserComment = Text5.Text

UserListCtl1.UserHomeDir = Text7.Text

UserListCtl1.UserScriptPath = Text9.Text

UserListCtl1.UserScriptName = Text15.Text

UserListCtl1.UserHomeDrive = “X:”

UserListCtl1.UserSetInfo

End Sub

See Also

UserComment

UserFullName

UserHomeDir

UserHomeDrive

UserLogonServer

UserNewPassword

UserPassword

UserScriptName

UserScriptPath


Specifies the new password string to be stored in the user account password field.
UserNewPassword Property

Properties	Methods

Description

Specifies the new password string to be stored in the user account password field.

Syntax

UserListCtl1.UserNewPassword = “newpassword”

Data Type

String

Example

Private Sub Command7_Click()

UserListCtl1.Machine = Text1.Text

UserListCtl1.UserName = Text3.Text

UserListCtl1.UserNewPassword = Text10.Text

UserListCtl1.UserChangePassword

End Sub

See Also

UserComment

UserFullName

UserHomeDir

UserHomeDrive

UserLogonServer

UserName

UserPassword

UserScriptName

UserScriptPath


Specifies the password string to be stored in the user account password field.
UserPassword Property

Properties	Methods

Description

Specifies the password string to be stored in the user account password field.

Syntax

UserListCtl1.UserPassword = “password”

Data Type

String

Example

Private Sub Command7_Click()

UserListCtl1.Machine = Text1.Text

UserListCtl1.UserName = Text3.Text

UserListCtl1.UserFullName = Text4.Text

UserListCtl1.UserComment = Text5.Text

UserListCtl1.UserLogonServer = Text6.Text

UserListCtl1.UserHomeDir = Text7.Text

UserListCtl1.UserPassword = Text8.Text

UserListCtl1.UserScriptPath = Text9.Text

UserListCtl1.UserScriptName = Text15.Text

UserListCtl1.UserHomeDrive = Text11.Text

UserListCtl1.UserAdd

End Sub

See Also

UserComment

UserFullName

UserHomeDir

UserHomeDrive

UserLogonServer

UserName

UserNewPassword

UserScriptName

UserScriptPath


Specifies the script name to be stored in the user account logon script name field.
UserScriptName Property

Properties	Methods

Description

Specifies the script name for the user to be stored in the user account User Profiles/Logon Script Name field.

Syntax

UserListCtl1.UserScriptName = “myscript.cmd”

Data Type

String

Example

Private Sub Command7_Click()

UserListCtl1.Machine = Text1.Text

UserListCtl1.UserName = Text3.Text

UserListCtl1.UserFullName = Text4.Text

UserListCtl1.UserComment = Text5.Text

UserListCtl1.UserLogonServer = Text6.Text

UserListCtl1.UserHomeDir = Text7.Text

UserListCtl1.UserPassword = Text8.Text

UserListCtl1.UserScriptPath = Text9.Text

UserListCtl1.UserScriptName = Text15.Text

UserListCtl1.UserHomeDrive = Text11.Text

UserListCtl1.UserAdd

End Sub

See Also

UserComment

UserFullName

UserHomeDir

UserHomeDrive

UserLogonServer

UserName

UserNewPassword

UserPassword

UserScriptPath


Specifies the path for the user logon script to be stored in the user account user profile path field.
UserScriptPath Property

Properties	Methods

Description

Specifies the path for the user logon script to be stored in the user account User Profiles/User Profile Path field.

Syntax

UserListCtl1.UserScriptPath = “\\users\scripts”

Data Type

String

Example

Private Sub Command7_Click()

UserListCtl1.Machine = Text1.Text

UserListCtl1.UserName = Text3.Text

UserListCtl1.UserFullName = Text4.Text

UserListCtl1.UserComment = Text5.Text

UserListCtl1.UserLogonServer = Text6.Text

UserListCtl1.UserHomeDir = Text7.Text

UserListCtl1.UserPassword = Text8.Text

UserListCtl1.UserScriptPath = Text9.Text

UserListCtl1.UserScriptName = Text15.Text

UserListCtl1.UserHomeDrive = Text11.Text

UserListCtl1.UserAdd

End Sub

See Also

UserComment

UserFullName

UserHomeDir

UserHomeDrive

UserLogonServer

UserName

UserNewPassword

UserPassword

UserScriptName


Displays Methods
Methods

All of the methods are listed below. Methods that apply only to

UserList, or require special consideration when used

with it, are underlined. They are documented in this help file.

See the Visual Basic Language Reference or online Help for

documentation of the remaining events.

ConnectUser

DisconnectUser

GetCurrentUserID

GetDCName

GetLocalMachineName

RenameUserID

SetFirstUser

SetFirstUserBeginningWith

UserAdd

UserChangePassword

UserDelete

UserGetInfo

UserGetNext

UserSetInfo


Establish a network connection with a specific user account.
ConnectUser Method

Properties	Methods

Description

Establish a network connection with a specific user account to a Windows NT machine.  The Machine, User ID and Password must have first been specified.

Syntax

UserListCtl1.ConnectUser

Example

Private Sub Command1_Click()

UserListCtl1.Machine = Text1.Text

UserListCtl1.ConnectPassword = Text14.Text

UserListCtl1.ConnectUserID = Text13.Text

UserListCtl1.ConnectUser

End Sub

See Also

ConnectPassword

ConnectUserID

DisconnectUser

Machine


Disconnect a network connection with a specific user account.
DisconnectUser Method

Properties	Methods

Description

Disconnect a network connection with a specific user account to a Windows NT machine.

Syntax

UserListCtl1.DisconnectUser

Example

Private Sub Command1_Click()

UserListCtl1.Machine = Text1.Text

UserListCtl1.DisconnectUser

End Sub

See Also

ConnectUser

Machine


Retrieve the current user account on the machine.
GetCurrentUserID Method

Properties	Methods

Description

Retrieve the current user account on the machine.

Syntax

Text3.Text = UserListCtl1.GetCurrentUserID

Data Type

String

Example

Private Sub Command2_Click()

Text3.Text = UserListCtl1.GetCurrentUserID

End Sub

See Also

GetLocalMachineName


Retrieve the domain controller for the current user.
GetDCName Method

Properties	Methods

Description

Retrieve the domain controller for the current user.  The Domain Name must have first been specified.

Syntax

Text1.Text = UserListCtl1.GetDCName

Data Type

String

Example

Private Sub Command2_Click()

UserListCtl1.Domain = Text12.Text

Text1.Text = UserListCtl1.GetDCName

End Sub

See Also

Domain


Retrieve the local machine name.
GetLocalMachineName Method

Properties	Methods

Description

Retrieve the local machine name.

Syntax

Text1.Text = UserListCtl1.GetLocalMachineName

Data Type

String

Example

Private Sub Command1_Click()

Text1.Text = UserListCtl1.GetLocalMachineName

End Sub

See Also

GetCurrentUserID


Rename the specified User ID to a different name.
RenameUserID Method

Properties	Methods

Description

Rename the specified User ID to a different name.

Syntax

UserListCtl1.Machine = Text1.Text

UserListCtl1.UserName = Text3.Text

UserListCtl1.RenameUserID (newUserID as String)

Data Type

String

Example

Private Sub Command11_Click()

UserListCtl1.Machine = Text1.Text

UserListCtl1.UserName = Text3.Text

UserListCtl1.RenameUserID (Text16.Text)

End Sub

See Also

Machine

UserName


Position UserList to the first user account from a Windows NT machine.
SetFirstUser Method

Properties	Methods

Description

Set the UserList pointer to the first user account from a Windows NT machine.  This method is typically used in a loop where you would retrieve all of the user accounts contained within a Windows NT machine.

Syntax

UserListCtl1.SetFirstUser

Example

Private Sub Command1_Click()

UserListCtl1.Machine = Text1.Text

UserListCtl1.SetFirstUser

i = 0

While UserListCtl1.UserGetNext <> 0

    List1.AddItem UserListCtl1.UserName + Chr(9) + Chr(9) + UserListCtl1.UserFullName + Chr(9) + Chr(9) + UserListCtl1.UserComment, i

    i = i + 1

Wend

End Sub

See Also

Machine

SetFirstUserBeginningWith

UserGetNext


Position UserList to the first user account beginning with a partial or full string, from a Windows NT machine.
SetFirstUserBeginningWith Method

Properties	Methods

Description

Set the UserList pointer to the first user account beginning with a partial or full string, from a Windows NT machine.  This method is typically used in a loop where you would retrieve all of the user accounts beginning with the string passed to the method, contained within a Windows NT machine.

Syntax

UserListCtl1.SetFirstUserBeginningWith(newVal As String) as Boolean

Data Type

Boolean

Example

Private Sub Command1_Click()

UserListCtl1.Machine = Text1.Text

StringToFind = Text2.Text

If UserListCtl1.SetFirstUserBeginningWith(StringToFind) <> 0 Then

i = 0

While UserListCtl1.UserGetNext <> 0

If InStr(1, UserListCtl1.UserName, StringToFind, vbTextCompare) <> 1 Then

            Exit Sub

        End If

        List1.AddItem UserListCtl1.UserName + Chr(9) + Chr(9) + UserListCtl1.UserFullName + Chr(9) + Chr(9) + UserListCtl1.UserComment, i

        i = i + 1

    Wend

End If

End Sub

See Also

Machine

UserGetNext

SetFirstUser


Add a new user account to the specified Windows NT machine.
UserAdd Method

Properties	Methods

Description

Add a new user account to the specified Windows NT machine.

Syntax

UserListCtl1.UserAdd

Notes

Security Requirements

Only members of the Administrators or Account Operators local group can successfully execute UserAdd. Only members of the Administrators local group can add an Administrators privilege account.

Example

Private Sub Command1_Click()

UserListCtl1.Machine = Text1.Text

UserListCtl1.UserName = Text3.Text

UserListCtl1.UserFullName = Text4.Text

UserListCtl1.UserComment = Text5.Text

UserListCtl1.UserLogonServer = Text6.Text

UserListCtl1.UserHomeDir = Text7.Text

UserListCtl1.UserPassword = Text8.Text

UserListCtl1.UserScriptPath = Text9.Text

UserListCtl1.UserScriptName = Text15.Text

UserListCtl1.UserHomeDrive = Text11.Text

UserListCtl1.UserAccountDisable = Check1.Value

UserListCtl1.UserAccountPasswordNotRequired = Check2.Value

UserListCtl1.UserAccountPasswordCanNotChange = Check3.Value

UserListCtl1.UserAccountLockedOut = Check4.Value

UserListCtl1.UserAccountPasswordDontExpire = Check5.Value

UserListCtl1.UserAccountPasswordExpired = Check6.Value

UserListCtl1.UserAdd

End Sub

See Also

Machine

UserName

UserDelete


Change the password for an existing user account on the specified Windows NT machine.
UserChangePassword Method

Properties	Methods

Description

Change the password for an existing user account on the specified Windows NT machine.

Syntax

UserListCtl1.UserChangePassword

Notes

Security Requirements

A server or domain can be configured to require a user to log on before changing the password on a user account. In that case, only members of the Administrators or Account Operators local group or the user himself can change the password for a user account.

Example

Private Sub Command1_Click()

UserListCtl1.Machine = Text1.Text

UserListCtl1.UserName = Text3.Text

UserListCtl1.UserNewPassword = Text10.Text

UserListCtl1.UserChangePassword

End Sub

See Also

Machine

UserName

UserNewPassword


Delete the specified user account on the specified Windows NT machine.
UserDelete Method

Properties	Methods

Description

Delete the specified user account on the specified Windows NT machine.

Syntax

UserListCtl1.UserDelete

Notes

Security Requirements

Only members of the Administrators or the Account Operators local group can successfully execute UserDelete on a remote server or on a computer that has local security enabled. Only members of the Administrators local group can delete an Administrators privilege account.

Example

Private Sub Command1_Click()

UserListCtl1.Machine = Text1.Text

UserListCtl1.UserName = Text3.Text

UserListCtl1.UserDelete

End Sub

See Also

Machine

UserName

UserAdd


Retrieve all information for the specified user account on the specified Windows NT machine.
UserGetInfo Method

Properties	Methods

Description

Retrieves all information associated with the specified user account on the specified Windows NT machine.

Syntax

UserListCtl1.UserGetInfo

Notes

Security Requirements

No special group membership is required to successfully execute UserGetInfo. This is a change from LAN Manager, which required membership in the Administrators or Account Operators local group to call this function at information levels above 0 (except for the user's own account, which could use level 11).

Example

Private Sub Command1_Click()

UserListCtl1.Machine = Text1.Text

UserListCtl1.UserName = Text3.Text

UserListCtl1.UserGetInfo

End Sub

See Also

Machine

UserName

UserSetInfo


Retrieve the next user account on the specified Windows NT machine.
UserGetNext Method

Properties	Methods

Description

Retrieve the next user account on a specified Windows NT machine.  This method is typically used in a loop where you would retrieve all of the users contained on a Windows NT machine.

Syntax

While UserListCtl1.UserGetNext <> 0

Data Type

Boolean

Example

Private Sub Command1_Click()

UserListCtl1.Machine = Text1.Text

UserListCtl1.SetFirstUser

i = 0

While UserListCtl1.UserGetNext <> 0

    List1.AddItem UserListCtl1.UserName + Chr(9) + Chr(9) + UserListCtl1.UserFullName + Chr(9) + Chr(9) + UserListCtl1.UserComment, i

    i = i + 1

Wend

End Sub

See Also

Machine

SetFirstUser


Update or set all information associated with the specified user account on the specified Windows NT machine.
UserSetInfo Method

Properties	Methods

Description

Update or set all information associated with the specified user account on the specified Windows NT machine.

Syntax

UserListCtl1.UserSetInfo

Notes

Security Requirements

No special group membership is required to successfully execute UserSetInfo. This is a change from LAN Manager, which required membership in the Administrators or Account Operators local group to call this function at information levels above 0 (except for the user's own account, which could use level 11).

Example

Private Sub Command1_Click()

UserListCtl1.Machine = Text1.Text

UserListCtl1.UserName = Text3.Text

UserListCtl1.UserAccountPasswordExpired = Check6.Value

UserListCtl1.UserSetInfo

End Sub

See Also

Machine

UserName

UserGetInfo